Optimal. Leaf size=126 \[ -\frac {d \sqrt {a+\frac {b}{x}} \left (2 \left (3 b^2 c^2+9 a b c d-2 a^2 d^2\right )+\frac {b d (3 b c+2 a d)}{x}\right )}{3 a b^2}+\frac {c \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 x}{a}-\frac {c^2 (b c-6 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {382, 100, 152,
65, 214} \begin {gather*} -\frac {c^2 (b c-6 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}}-\frac {d \sqrt {a+\frac {b}{x}} \left (2 \left (-2 a^2 d^2+9 a b c d+3 b^2 c^2\right )+\frac {b d (2 a d+3 b c)}{x}\right )}{3 a b^2}+\frac {c x \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 100
Rule 152
Rule 214
Rule 382
Rubi steps
\begin {align*} \int \frac {\left (c+\frac {d}{x}\right )^3}{\sqrt {a+\frac {b}{x}}} \, dx &=-\text {Subst}\left (\int \frac {(c+d x)^3}{x^2 \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )\\ &=\frac {c \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 x}{a}+\frac {\text {Subst}\left (\int \frac {(c+d x) \left (\frac {1}{2} c (b c-6 a d)-\frac {1}{2} d (3 b c+2 a d) x\right )}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )}{a}\\ &=-\frac {d \sqrt {a+\frac {b}{x}} \left (2 \left (3 b^2 c^2+9 a b c d-2 a^2 d^2\right )+\frac {b d (3 b c+2 a d)}{x}\right )}{3 a b^2}+\frac {c \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 x}{a}+\frac {\left (c^2 (b c-6 a d)\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )}{2 a}\\ &=-\frac {d \sqrt {a+\frac {b}{x}} \left (2 \left (3 b^2 c^2+9 a b c d-2 a^2 d^2\right )+\frac {b d (3 b c+2 a d)}{x}\right )}{3 a b^2}+\frac {c \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 x}{a}+\frac {\left (c^2 (b c-6 a d)\right ) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )}{a b}\\ &=-\frac {d \sqrt {a+\frac {b}{x}} \left (2 \left (3 b^2 c^2+9 a b c d-2 a^2 d^2\right )+\frac {b d (3 b c+2 a d)}{x}\right )}{3 a b^2}+\frac {c \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 x}{a}-\frac {c^2 (b c-6 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.22, size = 95, normalized size = 0.75 \begin {gather*} \frac {\sqrt {a+\frac {b}{x}} \left (4 a^2 d^3 x+3 b^2 c^3 x^2-2 a b d^2 (d+9 c x)\right )}{3 a b^2 x}+\frac {c^2 (-b c+6 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(534\) vs.
\(2(111)=222\).
time = 0.06, size = 535, normalized size = 4.25
method | result | size |
risch | \(\frac {\left (a x +b \right ) \left (3 b^{2} c^{3} x^{2}+4 a^{2} d^{3} x -18 a x b c \,d^{2}-2 a b \,d^{3}\right )}{3 b^{2} x^{2} a \sqrt {\frac {a x +b}{x}}}+\frac {\left (\frac {3 c^{2} \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) d}{\sqrt {a}}-\frac {c^{3} \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) b}{2 a^{\frac {3}{2}}}\right ) \sqrt {x \left (a x +b \right )}}{x \sqrt {\frac {a x +b}{x}}}\) | \(157\) |
default | \(-\frac {\sqrt {\frac {a x +b}{x}}\, \left (6 \sqrt {x \left (a x +b \right )}\, a^{\frac {7}{2}} d^{3} x^{3}-18 \sqrt {x \left (a x +b \right )}\, a^{\frac {5}{2}} b c \,d^{2} x^{3}+18 \sqrt {x \left (a x +b \right )}\, a^{\frac {3}{2}} b^{2} c^{2} d \,x^{3}-6 \sqrt {x \left (a x +b \right )}\, \sqrt {a}\, b^{3} c^{3} x^{3}+6 \sqrt {a \,x^{2}+b x}\, a^{\frac {7}{2}} d^{3} x^{3}-18 \sqrt {a \,x^{2}+b x}\, a^{\frac {5}{2}} b c \,d^{2} x^{3}-18 \sqrt {a \,x^{2}+b x}\, a^{\frac {3}{2}} b^{2} c^{2} d \,x^{3}+3 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{3} b \,d^{3} x^{3}-9 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{2} b^{2} c \,d^{2} x^{3}-9 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a \,b^{3} c^{2} d \,x^{3}-3 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{3} b \,d^{3} x^{3}+9 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{2} b^{2} c \,d^{2} x^{3}-9 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a \,b^{3} c^{2} d \,x^{3}+3 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) b^{4} c^{3} x^{3}-12 \left (a \,x^{2}+b x \right )^{\frac {3}{2}} a^{\frac {5}{2}} d^{3} x +36 \left (a \,x^{2}+b x \right )^{\frac {3}{2}} a^{\frac {3}{2}} b c \,d^{2} x +4 d^{3} \left (a \,x^{2}+b x \right )^{\frac {3}{2}} b \,a^{\frac {3}{2}}\right )}{6 x^{2} \sqrt {x \left (a x +b \right )}\, b^{3} a^{\frac {3}{2}}}\) | \(535\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 166, normalized size = 1.32 \begin {gather*} \frac {1}{2} \, c^{3} {\left (\frac {2 \, \sqrt {a + \frac {b}{x}} b}{{\left (a + \frac {b}{x}\right )} a - a^{2}} + \frac {b \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{a^{\frac {3}{2}}}\right )} - \frac {2}{3} \, d^{3} {\left (\frac {{\left (a + \frac {b}{x}\right )}^{\frac {3}{2}}}{b^{2}} - \frac {3 \, \sqrt {a + \frac {b}{x}} a}{b^{2}}\right )} - \frac {3 \, c^{2} d \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{\sqrt {a}} - \frac {6 \, \sqrt {a + \frac {b}{x}} c d^{2}}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.87, size = 233, normalized size = 1.85 \begin {gather*} \left [-\frac {3 \, {\left (b^{3} c^{3} - 6 \, a b^{2} c^{2} d\right )} \sqrt {a} x \log \left (2 \, a x + 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right ) - 2 \, {\left (3 \, a b^{2} c^{3} x^{2} - 2 \, a^{2} b d^{3} - 2 \, {\left (9 \, a^{2} b c d^{2} - 2 \, a^{3} d^{3}\right )} x\right )} \sqrt {\frac {a x + b}{x}}}{6 \, a^{2} b^{2} x}, \frac {3 \, {\left (b^{3} c^{3} - 6 \, a b^{2} c^{2} d\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right ) + {\left (3 \, a b^{2} c^{3} x^{2} - 2 \, a^{2} b d^{3} - 2 \, {\left (9 \, a^{2} b c d^{2} - 2 \, a^{3} d^{3}\right )} x\right )} \sqrt {\frac {a x + b}{x}}}{3 \, a^{2} b^{2} x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 37.56, size = 386, normalized size = 3.06 \begin {gather*} \frac {4 a^{\frac {7}{2}} b^{\frac {3}{2}} d^{3} x^{2} \sqrt {\frac {a x}{b} + 1}}{3 a^{\frac {5}{2}} b^{3} x^{\frac {5}{2}} + 3 a^{\frac {3}{2}} b^{4} x^{\frac {3}{2}}} + \frac {2 a^{\frac {5}{2}} b^{\frac {5}{2}} d^{3} x \sqrt {\frac {a x}{b} + 1}}{3 a^{\frac {5}{2}} b^{3} x^{\frac {5}{2}} + 3 a^{\frac {3}{2}} b^{4} x^{\frac {3}{2}}} - \frac {2 a^{\frac {3}{2}} b^{\frac {7}{2}} d^{3} \sqrt {\frac {a x}{b} + 1}}{3 a^{\frac {5}{2}} b^{3} x^{\frac {5}{2}} + 3 a^{\frac {3}{2}} b^{4} x^{\frac {3}{2}}} - \frac {4 a^{4} b d^{3} x^{\frac {5}{2}}}{3 a^{\frac {5}{2}} b^{3} x^{\frac {5}{2}} + 3 a^{\frac {3}{2}} b^{4} x^{\frac {3}{2}}} - \frac {4 a^{3} b^{2} d^{3} x^{\frac {3}{2}}}{3 a^{\frac {5}{2}} b^{3} x^{\frac {5}{2}} + 3 a^{\frac {3}{2}} b^{4} x^{\frac {3}{2}}} + 3 c d^{2} \left (\begin {cases} - \frac {1}{\sqrt {a} x} & \text {for}\: b = 0 \\- \frac {2 \sqrt {a + \frac {b}{x}}}{b} & \text {otherwise} \end {cases}\right ) + \frac {\sqrt {b} c^{3} \sqrt {x} \sqrt {\frac {a x}{b} + 1}}{a} - \frac {6 c^{2} d \operatorname {atan}{\left (\frac {1}{\sqrt {- \frac {1}{a}} \sqrt {a + \frac {b}{x}}} \right )}}{a \sqrt {- \frac {1}{a}}} - \frac {b c^{3} \operatorname {asinh}{\left (\frac {\sqrt {a} \sqrt {x}}{\sqrt {b}} \right )}}{a^{\frac {3}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.73, size = 107, normalized size = 0.85 \begin {gather*} \sqrt {a+\frac {b}{x}}\,\left (\frac {6\,a\,d^3-6\,b\,c\,d^2}{b^2}-\frac {4\,a\,d^3}{b^2}\right )-\frac {2\,d^3\,{\left (a+\frac {b}{x}\right )}^{3/2}}{3\,b^2}+\frac {c^3\,x\,\sqrt {a+\frac {b}{x}}}{a}-\frac {c^2\,\mathrm {atan}\left (\frac {\sqrt {a+\frac {b}{x}}\,1{}\mathrm {i}}{\sqrt {a}}\right )\,\left (6\,a\,d-b\,c\right )\,1{}\mathrm {i}}{a^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________